package com.rxmvp.baselibrary.base.dagger;

import com.rxmvp.baselibrary.base.mvp.IBaseView;
import com.trello.rxlifecycle2.LifecycleProvider;
import com.trello.rxlifecycle2.android.FragmentEvent;

import dagger.Module;
import dagger.Provides;

/**
 * 作者： huangRZ on 2017/2/14. 22:00
 * 邮箱：917647409@qq.com
 *
 * explain: Fragment的基类module
 */

@Module
public class FragmentModule {

    private IBaseView view;
    private LifecycleProvider<FragmentEvent> lifecycleProvider;

    public FragmentModule(IBaseView view, LifecycleProvider<FragmentEvent> lifecycleProvider) {
        this.view = view;
        this.lifecycleProvider = lifecycleProvider;
    }

    @Provides
    public IBaseView provideView(){
        return view;
    }

    @Provides
    public LifecycleProvider<FragmentEvent> providerLifecycleProvider(){
        return lifecycleProvider;
    }

}
